package Java攻略._1_基础知识._2_方法引用;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

public class _10_从类引用调用多参数实例方法 {

    List<String> strings = Arrays.asList("this","is","a","list","of","Strings");

    List<String> sorted = strings.stream()
            .sorted((s1,s2) -> s1.compareTo(s2))
            .collect(Collectors.toList());

    List<String> sorted1 = strings.stream()
            .sorted(String::compareTo)
            .collect(Collectors.toList());


}
